package com.umgsai.thread.thread67;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    public static String format(String formatPattern, Date date){
         return new SimpleDateFormat(formatPattern).format(date).toString();
    }
    
    public static Date parse(String formatPattern, String dateString) throws ParseException{
        return new SimpleDateFormat(formatPattern).parse(dateString);
    }
}
